<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018\9\12 0012
 * Time: 15:32
 */

namespace app\Lib\Model\Role;


use app\Lib\InterfaceIn\Role\RoleHandle;
use app\Lib\InterfaceIn\Role\RoleJudgeHandle;

class RoleJudge implements  RoleJudgeHandle
{
    /** @var RoleHandle $role */
    private $role;
    public function __construct(RoleHandle $role)
    {
        $this->role = $role;

    }

    /**
     * 判断是否是超级管理员
     * @return bool
     */
    public function isSuperAdministrator()
    {
        $result = false;
        if($this->role->getRoleAlias() == 'superAdministrator'){
            $result = true;
        }
        return $result;
    }

}